<%inherit file="/base/base-index.mako"/>

<%def name="title()">News List</%def>
<h2 align="center">
    <a href="/news/list?start=${max(c.start - c.size, 0)}&end=${c.start}&size=${c.size}&class_id=${c.class_id}"><<<</a>&nbsp;
    <a href="/news/list?start=${c.end}&end=${c.end + c.size}&size=${c.size}&class_id=${c.class_id}">>>></a>
</h2>

<div>
	% for n in c.news:

            % if n.class_id == 1:
                <img width="16px" height="16px" src="http://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Nuvola_Green_Plus.svg/128px-Nuvola_Green_Plus.svg.png" />
            % elif n.class_id == -1:
                <img width="16px" height="16px" src="http://icons.mysitemyway.com/wp-content/gallery/simple-red-square-icons-symbols-shapes/129883-simple-red-square-icon-symbols-shapes-minimize.png" />
            % else:
                <img width="16px" height="16px" src="http://www.clker.com/cliparts/1/3/e/6/1194989228908147779led_circle_grey.svg.med.png" />
            % endif
            <small>[<b>${n.reads}</b>]</small>
                -
            <a href="/news/news?news_id=${n.news_id}">${n.title[:40]}</a> <a href="${n.link}"><-></a>
            &nbsp;&nbsp;
            <small>${n.excerpt[:100]}</small>
            <br/>
    % endfor
</div>


<%def name="rightcontent()">

</%def>
